<script setup>
import { useRouter } from 'vue-router';
import { coffeedate } from '@/api/home'
import { ref } from 'vue'
const router = useRouter()
const coffeedata = ref([])
function onClickLeft() {
    router.back()
}
coffeedate().then(res => {
    // console.log(res.data.data);
    coffeedata.value = res.data.data
})
</script>

<template>
    <div class="box">
        <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="onClickLeft" />
        <div class="content">
            <van-card v-for="item in coffeedata" num="1" :price="item.price" :desc="item.information" :title="item.text"
                :thumb="item.img">

            </van-card>
        </div>
    </div>
</template>